import request from '@/utils/request'

//+++++++++++++++++++++++++++++++++++++++++好友欢迎语++++++++++++++++++++++++++++++++++++
//创建好友欢迎语接口
export function channelCreateFriend(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/create',
    method: 'POST',
    data
  })
}
//好友欢迎语列表接口
export function channelFriendList(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/list',
    method: 'POST',
    data
  })
}
//修改好友欢迎语接口
export function channelFriendUpdate(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/update',
    method: 'POST',
    data
  })
}
//好友欢迎语详情接口
export function channelFriendInfo(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/info',
    method: 'get',
    params: data
  })
}
//+++++++++++++++++++++++++++++++++++++++++入群欢迎语++++++++++++++++++++++++++++++++++++
//创建入群欢迎语接口
export function channelGroupCreate(data: any) {
  return request({
    url: '/scrm-api/console/channel/group/create',
    method: 'post',
    data
  })
}
//入群欢迎语列表接口
export function channelGroupList(data: any) {
  return request({
    url: '/scrm-api/console/channel/group/list',
    method: 'post',
    data
  })
}
//修改入群欢迎语接口
export function channelGroupUpdate(data: any) {
  return request({
    url: '/scrm-api/console/channel/group/update',
    method: 'post',
    data
  })
}
//入群欢迎语详情接口
export function channelGroupInfo(data: any) {
  return request({
    url: '/scrm-api/console/channel/group/info',
    method: 'get',
    params: data
  })
}
//选中的员工和部门ID
export function channelUserDepart(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/select/user/department',
    method: 'get',
    params: data
  })
}
//删除好友欢迎语
export function channelFriendDel(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/del',
    method: 'get',
    params: data
  })
}
//删除好友欢迎语
export function channelGroupDel(data: any) {
  return request({
    url: '/scrm-api/console/channel/group/del',
    method: 'get',
    params: data
  })
}


// 欢迎语活动模块
export function getWelcomeFriendModule(data?: any) {
  return request({
    url: '/scrm-api/console/market/welcome-friend/module',
    method: 'get',
    params: data
  })
}

// 更新欢迎语列表
export function welcomeFriendList(data: any) {
  return request({
    url: '/scrm-api/console/market/welcome-friend/list',
    method: 'post',
    data
  })
}

// 保存活动欢迎语(校验-是否修改)
export function channelFriendEdit(data: any) {
  return request({
    url: '/scrm-api/console/channel/friend/edit',
    method: 'get',
    params: data
  })
}